So we've seen creating a data model creating relationships between the various datasets within the data
model and we've seen creating a pivot table based off of that data model.
Now let's take a look at getting back into the data model and creating calculations with in the data
model environments.
Let's take a look.
I've got the example file back open yet I'm still sitting on the newly created pivot table based off
of the data model that we've created.
I'm going to go to my power pivot tab and on the far left I'm going to go back in to manage this or
reopen up the power pivot environment where I've got my multiple data sets and the relationship.
So now I want to create some crep calculations based off of this data.
We've seen how to create calculations inside of a pivot table but that's in the pivot table environment
.
That's not a part of our data model.
So I'm currently on the order Info tab within my data model and I can see all my data up above down
below I'd get a few rows that are really reserved for calculations that I want to create based off of
this data.
For example we saw how we can create an average freight back inside of the pivot table environment.
Let's take a look at how you can do an average rate within the data model.
So I'm going to hop over to my freight column really doesn't matter where it is as long as I'm inside
the freight column inside the freight column.
I'm then going to go to my hometown the top of my screen towards the far right we've got a section called
calculations and it's out of here.
We've got an auto some button.
Now if I go to the little drop down arrow right next door there are multiple different auto calculations
that we can create and one of them is average it's like the average and I've now got an average freight
right of that column which is $72 and roughly 24 cents average rate among all the orders within this
dataset.
Just a couple of clicks of the mouse nothing day.
You know maybe I want to count how many employees we have inside here or how many customers have placed
orders inside of this.
Orders table or maybe I don't want to get an average rate.
I want to get a summer break.
I want to count how many different times we use different shipping methods in know multiple things we
could do here.
But we can perform calculations and all you need to do click into the column.
Up up down to your on some button and pick your choice let's say in this case I'm going to do a distinct
count.
I want to know how many different shipping methods are shipped via methods we have.
So again say this the Count and I mean expand that column out so we can see the results here.
Keep going and we've got three different shipping methods.
They're really just one two and three.
Now that's a distinct count.
If I did just a count I believe that there's 830 records inside of here I can look in the lower left
hand corner one of what 08:30 there are eight hundred and thirty different ship via not just date but
ship via values inside this data set.
So again really simple just quick in the column heads to home go to some pick your calculation simple
simple.
Now we're going to take this a step further in the next lecture and utilize these calculations to create
KPI eyes.
So hold on.
Try this out first and then I'll jump into the next discussion of creating KPI inside of your data models
.